#ifndef __PI_CONFIG_H__
#define __PI_CONFIG_H__
#include "pi_test.h"

void config_pi_freq(void *param) {
    struct pi_param_t *pparam = (struct pi_param_t *)param;
    uint8_t i = 0;

    for (i = 0; i < pparam->dev_num; i++) {
        pparam->dev[i].index = i;
        if (pparam->dev[i].edge == 0) {
            pparam->dev[i].edge = PI_EDGE_RISE;
        }
        if (pparam->dev[i].delay == 0) {
            pparam->dev[i].delay = 10;
        }
    }

    if (pparam->read_cnt == 0)
        pparam->read_cnt = 1;

    pparam->en_read = 1;
    pparam->read_cnt = 1;
};

#endif /* __PI_CONFIG_H__ */
